Modernize to Rust 2024 edition and migrate from winapi to windows-sys#22
Open
coconutbird wants to merge 8 commits intodokan-dev:masterfrom
Open
Modernize to Rust 2024 edition and migrate from winapi to windows-sys#22coconutbird wants to merge 8 commits intodokan-dev:masterfrom
coconutbird wants to merge 8 commits intodokan-dev:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernizes the entire workspace to Rust 2024 edition and migrates from the legacy
winapicrate towindows-sysv0.61.2.Changes
Dependency migration
winapi→windows-sys 0.61.2acrossdokan-sys,dokan, and thememfsexample.LPCWSTR/LPWSTRtype aliases withPCWSTR/PWSTRfromwindows_sys::core.SECURITY_DESCRIPTOR_REVISION,SEF_AVOID_PRIVILEGE_CHECK,FILE_CASE_PRESERVED_NAMES, etc.) with proper imports fromwindows-sys.parking_lotdev-dependency —std::sync::Mutexis now competitive on modern Rust (futex-based on Windows since 1.62).lazy_staticusage withstd::sync::LazyLock(stable since Rust 1.80).Rust 2024 edition
Cargo.tomlfiles toedition = "2024".unsafequalifier toexternblocks as required by the new edition.OperationInfo::context()that was always UB but now triggers a non-unwinding panic (abort) in Rust 2024. Addedtry_context()method with a null check, and updatedcleanup/close_filecallbacks to handle null context gracefully.CI
.github/workflows/build.yml) that builds and tests onwindows-latest.wingetso all tests (including driver-dependent ones) can run.std::sync::Mutexpoisoning in test harness to prevent cascading failures.GetFileSecurityqueries with unexpectedsecurity_informationvalues.Housekeeping
Cargo.lockto.gitignore.Testing
All 32 tests pass locally and in CI (Windows). 1 test ignored (
can_reset_timeout). Doctests pass.